Ubuntu61
Category:Distributions Category:Ubuntu Someone recommended me Ubuntu as a good distribution. Tried to make this article beginnersfriendly as possible. This is also a placeholder to get back if I forgot how I dit it :) If you can improve please do. If you have questions ask at techdesk100 (at) hotmail (dot) com. Extra information Because I use mingw cygwin colinux qemu etc. I made a folder in my c drive called Linux and which has subfolders for each distribution. c:\Linux - Colinux - Cygwin - Distro (the folder with image files for colinux/qemu/distribtion iso's) - Mingw - Qemu ... Link TOOLS * explore2fs To be able to copy your files from image in Windows. One way. * unxutils like dd ls * winpcap driver for winpcap WEBSITES * colinux official site * colinux wiki * development and stable binaries website of henry nestler * colinux mailing list to search for known problems Qemu to make an ubuntu-desktop install image There is no (easy) way to install Ubuntu from a cd image to a file using colinux. So I needed an emulator which had a gui, could use easily without doing to much work and where you could convert the file into colinux image. In the article Converting Distributions there is an example how to convert a qemu image to colinux image. For this reasons I use qemu to make an installation. PREPARATION * Download Ubuntu 6.10 cd image from Ubuntu and put in Distro folder (C:\Linux\Distro) * Download Qemu from most recent windows port here is official site * Extract qemu zipfile from windows port to c:\Linux\Qemu * Go to the command prompt (Windows XP => Start / Run / CMD) * make an image to install Ubuntu (minimal 2048MB but you need more while installing) in dos by typing (3gb would be 1024*1024*1024*3 + 63*512) fsutil file createnew c:\Linux\Distro\qemu_ubuntu_3gb 3221257728 * make a image for a 512mb swap file in dos by typing (512mb would be 1024*1024*512 + 63*512) fsutil file createnew c:\Linux\Distro\qemu_swap_512mb 536903168 * Open notepad, create next batchfile, change settings like qemu_dir and name of iso file and save it (C:\Linux\Qemu\start_installation.bat) @ECHO OFF set qemu_dir=C:\Linux\Distro set hd=%qemu_dir%\qemu_ubuntu_3gb set swap=%qemu_dir%\qemu_swap_512mb set cdrom=%qemu_dir%\DIST-Ubuntu-6.10.iso set mem=256 qemu -hda %hd% -hdb %swap% -cdrom %cdrom% -m %mem% -boot d -L . pause * start up start_installation.bat and install Ubuntu with the second drive a swap drive INSTALLATION Here are some hints what to choose in the setup. Setup is really straightforward so it should give you not much trouble. * When the desktop appears doublepress Install icon. * Screen: Welcome choose your language press next * Screen: Where are you? choose your timezone * Screen: Keyboard Layout choose your keyboard (default U.S. English U.S. English) * Screen: Who are you? fill in your info * Screen: Select a disk select manually edit partition table * Screen: Prepare partitions create new partitions choose /dev/hda choose Create as: primary partition choose Filesystem: ext3 choose /dev/hdb choose "Create as:" primary partition choose "Filesystem:" linux-swap * Screen: Prepare mount points Should say something like Mount Point size Partition Reformat swap 510mb Partition 1 Disc IDE/ATA 2 (Primary) hdb1 v / 3GB Partition 1 Disc IDE/ATA 1 (Primary) hda1 v * Screen: Ready to install press install CONVERTING TO COLINUX I found this on one of the wikipages. * download and install unxutils I found a link here * go to the command prompt (Windows XP => Start / Run / CMD) * go to your distro folder cd \Linux\Distro * convert qemu ubuntu image to colinux image dd if=qemu_ubuntu_3gb of=ubuntu_3gb.img bs=512 skip=63 * you only need the file ubuntu_3gb.img the other 2 files (qemu_swap_512mb and qemu_ubuntu_3gb) can be removed (you could also save it for temp backup) install colinux and make image bootable '''TO KNOW' I use an extra image disk which I use between different distributions as a second disk. At the moment I use version 0.8.0 with kernel 2.6.17 and has Kernel with hotplug enabled (for udev). Before you start please check if there is a newer version of the colinux kernel at the testing folder of henry nestler. There are 2 types of network connections: TAP connection and a bridged connection(WinPCap). I normally use TAP with Fedora, but Ubuntu did not recognize the TAP. So in this case I will show usage of TAP and winPCap. For more information look at Network TAP driver creates an TAPconnection with an icon in Networkconnections. When you setup you networkcard using TAP connection goes through this TAP. This means you can only reach this connection from the host PC and not from another one. If you want to connect the internet using colinux you just make a shared connection from you internet connection (wlan or lan card) to the TAPconnection. Bridged connection is a shared connection with the network card (lan or wlan). The colinux machine is visible from outside the host PC. Colinux will also have another IP adress as the host PC. It is like two machines using the same card are connection to the internet. Both machines will ask for an IP adress and for example the router will give both a different IP. '''INSTALLATION AND PREPARATION' When you have downloaded the newest version of colinux start installing it. I use normally the options '''Native Windows Linux Console', colinux Virtual Ethernet Driver (TAP-Win32) and colinux Bridged Ethernet (WinPCap). If you want to use WinPCap please install the winPcap driver. When asked for a folder I use C:\Linux\Colinux.'' * Create an extra image 1gb file by using the following command in the dosprompt (windows XP): fsutil file createnew c:\Linux\Distro\ext3_disk_1gb.img 1073741824 * Create a swap image 512 mb because I will use 256 mb memory by using the following command in the dosprompt (windows XP): fsutil file createnew c:\Linux\Distro\swap_512mb 536870912 * Use noexecute to set the correct options. IF NOT DONE CORRECT PC WILL HANG AND YOU HAVE TO RESTART. * Go to Control Panel=>Network connections * Rename the LAN connection to LAN and the TAP connection to TAP. * right click on LAN connection and press properties * go to tab advanced, enable Allow other users to connect through this computer's internet connection and choose if applicable TAP * give the TAP connection a static IP 10.0.0.10 and subnetmask 255.255.255.0 * Create a colinux.conf file in the Distro folder for example C:\Linux\Distro\ubuntu-desktop_6_10.conf: ############################################ # MAKE SURE THERE IS AN EXTRA LINE AT THE END # OF THE BATCH FILE # # initrd should only be used at first start # to install kernel modules for example when # you upgrade your colinux ############################################ ############################################ # DEFAULT ############################################ # set your runlevel to text-only mode or graphical mode # root=/dev/hda1 fastboot 1 (single-user mode) # root=/dev/hda1 fastboot 3 (text-only mode) # root=/dev/hda1 fastboot 5 (graphic mode) ############################################ kernel=vmlinux initrd=initrd.gz mem=256 root=/dev/hda1 fastboot 5 ############################################ # Drives ############################################ #cobd0=C:\Linux\Distro\image #hda1=:cobd0 ############################################ hda1=\DosDevices\C:\Linux\Distro\ubuntu_3gb.img hda2=\DosDevices\C:\Linux\Distro\ext3_disk_1gb.img hdb1=\DosDevices\C:\Linux\Distro\swap_512mb ############################################ # Ethernet ############################################ #eth0=slirp,00:ff:00:00:00:00 #eth0=pcap-bridge,"LAN", 00:ff:00:00:00:00 #eth0=tuntap,TAP,00:ff:00:00:00:00 ############################################ eth0=tuntap,"TAP",00:ff:00:00:00:00 eth1=pcap-bridge,"LAN",00:ff:00:00:00:01 # please leave this as last line. Otherwise last of macadress goes as input for boot * Create a batch file in the colinux folder for example C:\Linux\Colinux\start_ubuntu-desktop.bat: @echo off colinux-daemon.exe --install-driver colinux-daemon.exe @"c:\Linux\Distro\ubuntu-desktop_6_10.conf" -t nt colinux-daemon.exe --remove-driver pause * start the batchfile start_ubuntu-desktop.bat so colinux starts(If it does not start it will give an error message. Maybe you typed something wrong). * Xwindows will crash when starting up but you can ignore that and continue in runlevel 3. (at XDMCP this problem wil be solved) * login with your username and pass for head user which you used before in setup Screen: Who are you? * if you want to login with root you can make a password for root. Otherwise when using sudo give the same password as the head user. sudo passwd * make swap file system sudo mkswap /dev/hdb1 * add swap to Ubuntu (also done in fstab) sudo swapon /dev/hdb1 * make sure that swap is added using free sudo free * or using swapon sudo swapon -s * format extra image to ext3 mkfs -t ext3 /dev/hda2 * edit /etc/fstab # this is what I changed mine fstab to proc /proc proc defaults 0 0 /dev/hda1 / ext3 defaults 1 1 /dev/hda2 /mnt ext3 defaults 1 1 /dev/hdb1 swap swap defaults 0 0 NETWORKING setup interfaces * edit /etc/network/interfaces # File: /etc/network/interfaces auto lo iface lo inet loopback auth eth0 iface eth0 inet static address 10.0.0.100 netmask 255.255.255.0 gateway 10.0.0.10 auth eth1 iface eth1 inet dhcp auth eth2 iface eth2 inet dhcp auth ath0 iface ath0 inet dhcp auth wlan0 iface wlan0 inet dhcp * to know your ip-adress use the following command ifconfig DNS DNS Updates automatically (DHCP). But if you want to set it manually: * to use a dns server edit /etc/resolv.conf nameserver 111.111.111.111 UPDATE WITH APT-GET When I first tried to install things like openssh-server it said it could not find it. But after running this command everything worked fine. sudo apt-get update * To get the newest updates us the following command sudo apt-get upgrade SSH TO UBUNTU-DESKTOP * install an ssh server (don't forget to update apt-get before using following command) sudo apt-get install openssh-server * now you can ssh your ubuntu-desktop using the IP-adress from eth1 compress image file smallest possible Ok after you've done all this you could start to make a rar file so you can if you do something wrong just unpack the rar file and you start all over. (found at the mail list). It can become big because the empty space is not really zero so your compressor makes the file big. What you do is you make a file which has null characters that is as big as the empty space and remove the file * start with another image file and set the image you want to compress in the xml conf file in this example hda2 * mount the image into /mnt mount /mnt /dev/hda2 * remove colinux modules rm -rf /mnt/lib/modules/*-co-* * remove wtmp rm -f /mnt/var/log/wtmp * remove all from tmp rm -rf /mnt/tmp/* * clean apt get chroot /mnt sudo apt-get clean exit * or clean yum chroot /mnt yum clean all exit * get the number of available space in mb chroot /mnt df -m #Filesystem 1M-blocks Used Available Use% Mounted on #/dev/hda2 1984 750 1132M 40% /mnt exit * make a file filled with zero which is almost as big as the empty space in hda2. For count do the available size of hda2 minus 2 dd if=/dev/zero of=/mnt/foobar bs=1M count=1130 * remove the zero file rm /mnt/foobar * clean /mnt/root/.bash_history * Unmount the image from /mnt umount /mnt * change mountcount etc tune2fs -c 0 /dev/hda2 tune2fs -T 20070101 /dev/hda2 If you compress it now, it will become much smaller. XDMCP As you already know x-windows starts crashing every time you start ubuntu-desktop. This problem we will solve here by disabling the opening of a local window. For the XDMCP client I use XMING and for Desktop Environment I use KDE. (but you can use your own like winx-32 x-deep32 and GNOME). * edit in /etc/gdm/gdm.conf to disable opening local display and enabling xdmcp before xdmcp Enable=false servers 0=Standard after xdmcp Enable=true servers #0=Standard * edit in /etc/gdm/gdm.conf if you want to be able to login as root before security AllowRoot=false AllowRemoteRoot=false after security AllowRoot=true AllowRemoteRoot=true * restart xwindows sudo /etc/init.d/gdm restart * create an xlaunch file by ** starting xlaunch and choosing the options below and at the last screen choose save configuration Display Settings One window Display number 0 Start Xming Open Session via XDMCP Connect to host the IP adress from eth1 using winPCap Clipboard enabled ** or create file xming.xlaunch on windows host (don't forget to change the IP-adress) 192.168.1.2" Display="0" Clipboard="true" /> * doublepress xming.xlaunch to start xming and voila you have your xwindows For SLIRP based networking, it is convenient to use the localhost IP 127.0.0.1, instead of the actual IP, to connect to the colinux host. Especially useful for laptop users whose IP changes frequently.